﻿using Adnc.Infra.Entities;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;

namespace WYT.Usr.Repository.Entities
{
    /// <summary>
    /// 用户升级日志
    /// </summary>
    [Table("usr_userGradeLog"), Comment("用户升级日志"), Index(nameof(UserId))]
    public class UserGradeLog : EfEntity
    {
        /// <summary>
        /// 用户ID
        /// </summary>
        [Comment("用户ID")]
        public long UserId { get; set; }

        /// <summary>
        /// 变化前等级
        /// </summary>
        [Comment("变化前等级")]
        public int ChangeFrontGrade { get; set; }

        /// <summary>
        /// 变化后等级
        /// </summary>
        [Comment("变化后等级")]
        public int ChangeLaterGrade { get; set; }

        /// <summary>
        /// 变化原因：1、单量升级；2、手动调整；3、特色名额升级
        /// </summary>
        [Comment("变化原因：1、单量升级；2、手动调整；3、特色名额升级")]
        public int Mode { get; set; }

        /// <summary>
        /// 描述
        /// </summary>
        [Comment("描述")]
        public string? Describe { get; set; }

        /// <summary>
        /// 变化时间
        /// </summary>
        [Comment("变化时间")]
        public DateTime ChangeTime { get; set; }

        /// <summary>
        /// 操作人
        /// </summary>
        [Comment("操作人")]
        public long? Operator { get; set; }

        /// <summary>
        /// 关联单据
        /// </summary>
        [Comment("关联单据")]
        public long? OrderSource { get; set; }
    }
}
